#!/usr/bin/env ruby

require 'rubygems'
require 'fileutils'
require 'daemons'

log_base =  File.expand_path(ENV['HOME'] + '/Installr/logs', __FILE__)
FileUtils.mkdir_p(log_base) unless File.directory?(log_base)

options = {
  :app_name   => "Installr",
  :dir_mode   => :normal,
  :dir        => log_base,
  :multiple   => true,
  :mode       => :load,
  :backtrace  => true,
  :monitor    => true,
  :log_output => true
}

Daemons.run(File.join(File.dirname(__FILE__), 'Installr'), options)
